Triggers
Use Report and Page Triggers to trigger a publication or pages within it to render based on given slicer values. This gives you more control over when the publication (and pages within it) will be rendered and distributed; rather than rendering all slicer values according to a schedule, only slicer values meeting a given condition will trigger the publication to render.
Report Triggers
Report triggers are used to trigger a publication based on slicer values. When a publication containing slices is published, multiple publications are produced, each one being filtered by a different slice or slice combination. If there are multiple slicers, then every possible slice combination will be produced.
Using report triggers, you can determine that specific slices will only be used if a given trigger condition is met. The trigger condition is defined using PQL, and can even incorporate the Chat GPT PQL function.
After defining the condition, proceed to the schedule panel and choose which slices should be used to filter the publication. Of the selected slices, only those for which the given condition is met will be used to filter the publication.
For instance, say the publication contains 1 slicer comprised of 3 slices; yellow, green, and blue. The given condition was met for yellow and green, but not for blue. The report will be triggered, and 2 reports will be produced; one filtered by yellow, and the other filtered by green. If the condition was met for all 3 slicers, then 3 reports will be produced; one for each color. If the condition wasn't met for any of the slices, then the publication will not be triggered at all.
How to Configure Report Triggers
- Start by adding slicers to the publication.
- Open the Report Trigger Manager from the Publication ribbon.
- Check "Use Trigger" and select "Trigger if True" or "Trigger is False".
- Click New Condition and configure your condition from the Create Condition dialog.
- Confirm the interaction between the trigger and the slicer by marking the check box.
- Save the presentation and create a new schedule.
- From the Selections panel, choose the slice(s) that should be used when the report is triggered. You may select either Basic or Multiple. Save the schedule when done.
- The report will be triggered and rendered at the scheduled time, or according to the triggered launch; a separate report will be rendered for each slice for which the given condition was met.
Page Triggers
Page triggers offer a way to apply the page repeater based on trigger conditions. The page repeater is used to filter visuals in the publication; it renders a given visual multiple times, filtering it by a different slice each time.
Using page triggers, you can create conditions to trigger this process. The result is that only slices for which the condition was met will be used to filter the visual.
How to Configure Page Triggers
- Start by adding a slicer to the Page Repeater. Confirm the interaction between the page repeater and the visual by marking the check box.
- Open the Page Trigger Manager from the Publication ribbon.
- Select the page for which you want to configure conditions and select "Use Trigger." Select either "Trigger if True" or "Trigger if False".
- Click "New Condition" and define write your expression in the Create Condition dialog.
- Test and apply the expression, then apply the condition.
- Save the publication and create a new schedule.
- The report will be triggered and rendered at the scheduled time, or according to the triggered launch; a separate page will be rendered for each slice for which the given condition was met.
PQL Functions
The Pyramid Query Language or PQL (pronounced 'Prequel') is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allows users to query data and build analytical logic.
The Create Query Condition dialog exposes Dynamic and Common functions. Dynamic functions are a set of specialized method that are designed to act on a given query 's result set. Common functions are a set of methods that are found in most programmatic and mathematical function libraries. These functions are used to perform logic on basic data without concern for data structures, context, or even source.
To add a PQL function from the library to the script editor, simply double click on it. You will then need to inject values into the function.
Using the ChatGPT AI-Driven PQL Function
Pyramid's Generative AI integration enables you to use AI to generate scripts and images, dynamic text and infographics, calculations and lists, schedules, colors, and more. This allows you to generate a range of content, including complex code, by simply providing a text prompt.
You can incorporate the ChatGPT AI-driven PQL function (from the Common PQL functions) into your PQL formula to return results from Open AI. While this function cannot tell you about your data set, it can add additional information and background to your publication.
Warning: AI-generated assets are generated from public domain algorithms, which can produce both erroneous and inconsistent or random results. Use at your own risk.